﻿using System;
using System.Collections.Generic;
using DataAccessLibrary.DAL;
using entities;

namespace BusinessLogicLibrary
{
    public class SearchModule
    {
        private readonly SearchDAO _dao = new SearchDAO();

        public List<vRoomInfo> SearchRooms(DateTime inDate, DateTime outDate, int roomTypeId, int minPrice, int maxPrice,
                                           bool view, bool bath, bool balcony)
        {
            inDate = inDate.Date;
            outDate = outDate.Date;
            inDate = inDate.Add(new TimeSpan(12, 0, 0));
            outDate = outDate.Add(new TimeSpan(11, 0, 0));
            return _dao.SearchRooms(inDate, outDate, roomTypeId, minPrice, maxPrice, view, bath, balcony);
        }
    }
}